-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix USDC user bank creation #10445
Fix USDC user bank creation #10445
Conversation
🦋 Changeset detectedLatest commit: cc6198e The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💯
Preview this change https://demo.audius.co/mjp-sdk-get-or-create-usdc-userbank |
Preview this change https://demo.audius.co/mjp-sdk-get-or-create-usdc-userbank |
Preview this change https://demo.audius.co/mjp-sdk-get-or-create-usdc-userbank |
const confirmationStrategyArgs = | ||
const computeBudgetLimitInstruction = | ||
ComputeBudgetProgram.setComputeUnitLimit({ | ||
units: 50000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What criteria determines this value? And I thought we used constants that were settable by remote config for things like this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I looked at what the simulation estimated the compute limit to be, and then doubled it. It's a bit of a magic number, can probably revisit later. Want to get this in though because the smaller we can make this number (it defaults to 200k) the more likely validators will let us in their block.
getOrCreateUSDCUserBank
to use SDKClaimableTokensClient
is a singleton, and itsgetOrCreateUserBank
should be concurrency safe already, so no need for saga channels.getOrCreateUserBank
in theClaimableTokensClient
Another bug I found is the funding of Solana relayers script is failing due to outdated
@solana/web3.js
. It was missed in the audit because its source is not on GitHub. I've funded the wallets and will publish a new repo for this script as well.